home *** CD-ROM | disk | FTP | other *** search
/ Plug-In Power Pack for Netscape Communicator / Plug-In Power Pack for Netscape Communicator.iso / plugins / dataviews / dvtools / examples / windows / dv_ocx / dvctrl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-08  |  2.4 KB  |  105 lines

  1. // dvctrl.h : Declaration of the DVocx OLE control class.
  2.  
  3. /////////////////////////////////////////////////////////////////////////////
  4. // DVocx : See dvctrl.cpp for implementation.
  5.  
  6. class DVocx : public COleControl
  7. {
  8.     DECLARE_DYNCREATE(DVocx)
  9.  
  10. // Constructor
  11. public:
  12.     DVocx();
  13.         VIEW m_view;
  14.         OBJECT m_screen;
  15.         DRAWPORT    m_dp;
  16.         BOOL ok_to_draw;
  17.         UINT m_nTimeOut;
  18.         afx_msg LONG OnExpose(UINT,LONG);
  19.         afx_msg LONG OnResize(UINT,LONG);
  20.         void Init();
  21.         void Paint (WPARAM wParam, LPARAM lParam);
  22.         virtual LRESULT WindowProc( UINT message, WPARAM wParam, LPARAM lParam );
  23.  
  24. #ifdef STRICT
  25.     WNDPROC dv_winproc ;
  26. #else
  27.     FARPROC dv_winproc ;
  28. #endif 
  29.  
  30. // Overrides
  31.  
  32.     // Drawing function
  33.     virtual void OnDraw(
  34.                 CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
  35.  
  36.     // Persistence
  37.     virtual void DoPropExchange(CPropExchange* pPX);
  38.  
  39.     // Reset control state
  40.     virtual void OnResetState();
  41.  
  42. // Implementation
  43. protected:
  44.     ~DVocx();
  45.  
  46.     DECLARE_OLECREATE_EX(DVocx)    // Class factory and guid
  47.     DECLARE_OLETYPELIB(DVocx)      // GetTypeInfo
  48.     DECLARE_PROPPAGEIDS(DVocx)     // Property page IDs
  49.     DECLARE_OLECTLTYPE(DVocx)        // Type name and misc status
  50.  
  51. // Message maps
  52.     //{{AFX_MSG(DVocx)
  53.     afx_msg void OnTimer(UINT nIDEvent);
  54.     afx_msg void OnDestroy();
  55.     afx_msg void OnPaint();
  56.     //}}AFX_MSG
  57.     DECLARE_MESSAGE_MAP()
  58.  
  59. // Dispatch maps
  60.     //{{AFX_DISPATCH(DVocx)
  61.     long m_updateRate;
  62.     afx_msg void OnUpdateRateChanged();
  63.     BOOL m_fUseDblBuf;
  64.     afx_msg void OnUseDoubleBufferingChanged();
  65.     CString m_viewFile;
  66.     afx_msg void OnViewFileChanged();
  67.     BOOL m_autoUpdate;
  68.     afx_msg void OnAutoUpdateChanged();
  69.     double m_scale;
  70.     afx_msg void OnScaleChanged();
  71.     afx_msg void StartUpdating();
  72.     afx_msg void StopUpdating();
  73.     afx_msg void SetView(LPCTSTR szViewFile);
  74.     afx_msg void CloseView();
  75.     afx_msg void UpdateWindow();
  76.     afx_msg void ZoomTo(double scale);
  77.     //}}AFX_DISPATCH
  78.     DECLARE_DISPATCH_MAP()
  79.  
  80.     afx_msg void AboutBox();
  81.  
  82. // Event maps
  83.     //{{AFX_EVENT(DVocx)
  84.     //}}AFX_EVENT
  85.     DECLARE_EVENT_MAP()
  86.  
  87. // Dispatch and event IDs
  88. public:
  89.     enum {
  90.     //{{AFX_DISP_ID(DVocx)
  91.     dispidUpdateRate = 1L,
  92.     dispidUseDoubleBuffering = 2L,
  93.     dispidViewFile = 3L,
  94.     dispidAutoUpdate = 4L,
  95.     dispidScale = 5L,
  96.     dispidStartUpdating = 6L,
  97.     dispidStopUpdating = 7L,
  98.     dispidSetView = 8L,
  99.     dispidCloseView = 9L,
  100.     dispidUpdateWindow = 10L,
  101.     dispidZoomTo = 11L,
  102.     //}}AFX_DISP_ID
  103.     };
  104. };
  105.